Analiza przeprowadzona dla krajów:
Wartości:
Zakres lat: 1995 - 2018
W krajach Francja, Niemcy oraz Polska ilość samobójstw utrzymuje się na stałym poziomie, niezależnie od ilości populacji zamieszkującej tereny zurbanizowane. W Japonii ilość samobójstw maleje, natomiast populacja w miastach zurbanizowanych rośnie, jak widać Japonia skutecznie radzi sobie z problemem samobójstw. W Stanach Zjednoczonych widać zależność pomiędzy ilością populacji terenów zurbanizowanych, a ilością popełnianych samobójstw.
# Modify global options in R - disable scientific notation
options(scipen = 999)
# Library Import
library("readxl")
library("ggplot2")
library("plotly")
library("dplyr")
library("knitr")
library("DT")
library("readxl")
library("tidyverse")
# Import data from files
wd_indicators <- read_excel("Data\\World_Development_Indicators.xlsx", na=c("", ".."))
| Country Name | Series Name | Year | value | |
|---|---|---|---|---|
| Length:405 | Length:405 | Min. :1995 | Min. : 3 | |
| Class :character | Class :character | 1st Qu.:2003 | 1st Qu.: 13 | |
| Mode :character | Mode :character | Median :2008 | Median : 21 | |
| NA | NA | Mean :2008 | Mean : 28668367 | |
| NA | NA | 3rd Qu.:2013 | 3rd Qu.: 23622394 | |
| NA | NA | Max. :2018 | Max. :268844029 |
Analiza przeprowadzona dla krajów:
Wartości:
Zakres lat: 1995 - 2018
Top sześć wartości:
| Country Name | Series Name | Year | value |
|---|---|---|---|
| France | Urban population | 1995 | 44604031 |
| Germany | Urban population | 1995 | 60378049 |
| Japan | Urban population | 1995 | 97888236 |
| Poland | Urban population | 1995 | 23733222 |
| United States | Urban population | 1995 | 205718394 |
| France | Urban population | 1996 | 44863819 |
Wyliczenie dla każdego z krajów z analizy liczby osób popełniających samobójstwo na podstawie wartości procentowej na 100,000 osób z populacji.
# Suicides
Suicides <- wd_indicators %>%
filter(wd_indicators$`Series Name` == "Suicide mortality rate (per 100,000 population)")
# Urban population
UrbanPopulation <- wd_indicators %>%
filter(wd_indicators$`Series Name` == "Urban population") %>%
filter(Year >= "2000")
# Suicides rate on urban population
Suicides$value <- UrbanPopulation$value * (Suicides$value / 100)
Kraje brane pod uwagę oraz ilosć populacji - zbiorczo